<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>淮北市新生儿预防接种转诊单</title>
	<style type="text/css">
	  @page {
	   size: auto;
	   margin: 0mm;
	  }
		*{ margin: 0; padding: 0; font-size: 14px; font-family: simsun;}
		.wrap{line-height: 24px; padding: 50px 70px;}
		.title{ font-size: 20px; line-height: 28px;margin-bottom: 20px;font-weight: bold;}
		.row-3 , .row-2{ width: 100%;}
		.row-3 span , .row-2 span{ display: inline-block;}
		table{
			border-collapse:collapse;   /*表格边框合并*/
			border-spacing:0;  /*边框之间的距离*/
		}
		td{
			height: 24px;
			padding: 2px;
		}
		.underline{ text-decoration: underline;}
		.red{ color: red;}
		.text-left{ text-align: left;}
		.text-center{ text-align: center;}
		.text-right{ text-align: right;}
		.fl{ float: left}
		.fr{ float: right;}
		.clear{ clear: both;}
		.wper100{ width: 100%;}
		.wper58{ width: 58%;}
		.wper50{ width: 50%;}
		.wper48{ width: 48%;}
		.wper28{ width: 28%;}
		.wper20{ width: 20%;}
		.wper25{ width: 25%;}
		.pt10{ padding-top: 10px;}
		.pb15{ padding-bottom: 15px;}
		em{ font-style: normal;}
	</style>
</head>
<body>
	<div class="wrap">
		<p class="title text-center">淮北市新生儿预防接种转诊单</p>
		<div class="row-2">
			<span class="wper48">儿童编码：<em class="child-id">${childBaseinfoTemp.childcode }</em></span>
			<span class="wper48">查询编码：<em class="child-id">${childBaseinfoTemp.querycode }</em></span>
		</div>
		<div class="row-3">
			<span class="wper28">儿童姓名：<em class="child-name">${childBaseinfoTemp.childname }</em></span>
			<span class="wper20">性别：<em class="sex">${fns:getDictLabel(childBaseinfoTemp.gender, 'sex', '')}</em></span>
			<span class="wper25">出生日期：<em class="birthday"><fmt:formatDate value="${childBaseinfoTemp.birthday}" pattern="yyyy-MM-dd"/></em></span>
		</div>
		<div class="row-3">
			<span class="wper28">胎次：<em class="parity">${childBaseinfoTemp.childorder }</em></span>
			<span class="wper20">体重：<em class="weight">${childBaseinfoTemp.birthweight }克</em></span>
			<span class="wper25">民族：<em class="nation">${fns:getDictLabel(childBaseinfoTemp.nation, 'nation', '')}</em></span>
		</div>
		<p>出生证号：<em class="birth-card">${childBaseinfoTemp.birthcode }</em></p>
		<div class="row-2">
			<span class="wper48">母亲姓名：<em class="mum-name">${childBaseinfoTemp.guardianname }</em></span>
			<span class="wper48">父亲姓名：<em class="dad-name">${childBaseinfoTemp.father }</em></span>
		</div>
		<div class="row-2">
			<span class="wper48">母亲身份证：<em class="mum-card">${childBaseinfoTemp.guardianidentificationnumber }</em></span>
			<span class="wper48">父亲身份证：<em class="dad-card">${childBaseinfoTemp.fathercard }</em></span>
		</div>
		<div class="row-2">
			<span class="wper48">母亲电话：<em class="mum-phone">${childBaseinfoTemp.guardianmobile }</em></span>
			<span class="wper48">父亲电话：<em class="mum-phone">${childBaseinfoTemp.fatherphone }</em></span>
		</div> 
		<div class="row-2">
			<span class="wper48">出生医院：<em class="birth-hosptail">${fns:getUser().office.name} </em></span>
			<span class="wper48">医院电话：<em class="mum-phone">${childBaseinfoTemp.localOffice.phone}</em></span>
		</div> 
		<p>医院地址：<em class="birth-hosptail">${childBaseinfoTemp.localOffice.address}</em></p>
		<p>户籍地址：<em class="permanent">${childBaseinfoTemp.regAddressAll}</em></p>
		<p>户口类别：<em class="node-type">${fns:getDictLabel(childBaseinfoTemp.	properties, 'properties', '')}</em></p>
		<p>家庭住址：<em class="address">${childBaseinfoTemp.homeAddressAll}</em></p>
		<p>居住属性：<em class="live-attr">${fns:getDictLabel(childBaseinfoTemp.reside, 'reside', '')}</em></p> 	
		<p>疫苗接种情况：</p>
		
		<table border='1' class="wper100">
			<thead>
				<tr>
					<td>疫苗名称</td>
					<td>接种日期</td>
					<td>接种部位</td>
					<td>疫苗批号</td>
					<td>有效期</td>
					<td>生产企业</td>
					<td>接种单位</td>
					<td>接种人员</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${childBaseinfoTemp.records }" var="rec">
					<tr>
						<td>${rec.vaccName}</td>
						<td><fmt:formatDate value="${rec.vaccinatedate }" pattern="yyyy-MM-dd"/> </td>
						<td>${fns:getDictLabel(rec.bodypart, 'position', '')}</td>
						<td>${rec.batch}</td>
						<td><fmt:formatDate value="${rec.vaccExpDate }" pattern="yyyy-MM-dd"/> </td>
						<td>${rec.manufacturer }</td>
						<td>${fns:getUser().office.name}</td>
						<td>${rec.doctor}</td>
					</tr>
				</c:forEach>
				<c:forEach items="${fullTable }" var="ft">
					<tr>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
				</c:forEach>
				<!-- <tr>
					<td>卡介苗</td>
					<td>2018-5-12</td>
					<td>右上臂</td>
					<td>20171213@1</td>
					<td>2019-12-10</td>
					<td>上海生物</td>
					<td>淮北市人民医院</td>
					<td>王小菊</td>
				</tr> -->
			</tbody>
		</table>
		<p class="pt10">如未能完成接种，请注明原因：<span class="underline reason">&emsp;${not empty childBaseinfoTemp.remarks?childBaseinfoTemp.remarks:'&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;' }&emsp;</span></p>
		<p>尊敬的宝宝家长，<span class="red">按照属地管理原则</span>请您务必于宝宝满月前持本转诊单到  ${childBaseinfoTemp.localOffice.name} ${childBaseinfoTemp.localOffice.phone}  办理《儿童预防接种证》，咨询预约接种疫苗事宜。</p>
		<p class="text-right">${fns:getUser().office.name}（业务章）</p>
		<p class="text-right date">${fns:getDate('yyyy年MM月dd日')}</p>
	</div>
</body>
	<script>
		
	  	/* 打印事件执行后，返回建卡列表页面 */
		/* if(document.execCommand("print")){
			history.back();
		} */
		 window.print(); 
		/* 打印之后，销毁页面 */
 		setTimeout("top.opener=null;window.close()",1);
	</script>
</html>